Smartcard is also named as Integrated Circuit card, i.e. IC card. Smartcard including an Integrated Circuit chip embedded in a plastic substrate is packaged as a form of card, and its shape is similar to a magnetic card covered with magnetic stripe. A concept of Smartcard came forth in 1970s. In 1976, BULL corporation in France firstly contrived a Smartcard product, and further applied this technology to multi-fields such as finance, traffic, medical treatment, identity certificate and the like. The Smartcard chip has the capability of writing data and storing data. When necessary, contents stored in the memory of the Smartcard can be conditionally provided for outer reading, interior information process and determination.
The Smartcard file system is analogous to a tree-like file system of DOS. ISO7816 supports two kinds of file: Dedicated File (named as “DF”) and Elementary File (named as “EF”). DF is in some wise similar to DOS directory, while EF is in some wise similar to data file. DF(s) in the DF, which of course could further include DF(s), is similar to DOS subdirectory. Similar to file system of DOS, the Smartcard file system also must include a root file that is a DF, and this root file is called as Master File (named as “MF”) that is similar to the root directory of DOS.)
In structure of the Smartcard file system, it can but has one MF, and number of DF is optional. MF and DF play the role of managing and forming the structure of tree-like file system, and the file for storage data is EF.
MF is the root of Smartcard file system, and all kinds of DF and EF can be created in the MF. Although the file system permits to directly generate all sorts of application file of EF, the best method for organizing file lies in allotting one DF to every kind of application and further organizing all kinds of application data of EF in the corresponding DF.
DF, in which all kinds of DF and EF can be created, contains information of file control and distributable storage area. Generally, one DF is used to storing all data corresponding to one application. DF occupies a block of SRAM in the user memory; once the DF is created, the size of DF's SRAM is invariable. For EF in this DF, however, the size of memory used by EF can be redistributed, and also can be deleted. After deleting the DF, DF(s) and EF(s) in the deleted DF is also deleted simultaneously; the block of memory released by deleting can be used by other DF(s).
EF acts as a leaf of the tree-like Smartcard file system, in which other file(s) can't be created.
The existing Smartcard file system follows defining of ISO7816-4. As shown in FIG. 1, wherein MF indicates the logic root directory of the file system which has only one MF; DF (Dedicated File) usually is the root directory of the Smartcard application, similar to subdirectory, which exists in the MF or other DF; EF (Elementary File) usually is used to store cipher keys or application data and it exists in the MF or DF.
Wherein, MF's attribute lies in: File Identifier (named as “FID”) of two bytes 3F00 (hex and same to hereinafter);                DF's attributes lies in: File Identifier (named as “FID”) of two bytes (not 3F00, 0000, or FFFF), Application Identifier (named as “AID”) with up to 16 bytes and at least 5 bytes;        EF's attributes lies in: File Identifier (named as “FID”) of two bytes (not 3F00, 0000, or FFFF), Short File Identifier (named as “SID”) of one byte;        Limitation lies that: FID of every DF must be unique, FID of every EF must be unique, and every DF can but possess 31 EFs at most.        
The way of selecting file is the following:                Selecting by FID: MF, DF or EF can be selected by designated FID;        Selecting by path: DF or EF can be selected by selecting the path of DF or EF, in the path, root directory locating in front and the subdirectory locating behind, it either can be a relative path (current DF as a starting point) or can be a absolute path (MF as a starting point);        Selecting by Short File Identifier (named as “SID”): only EF can be selected in this way, and EF in current MF or DF is selected by SID of designated file.        
ISO7816-4 defines four basic types of EF which respectively are:                Transparent File also called as binary file;        Linear Fixed File also called as fixed-length file;        Linear Variable File also called as variable-length file;        Cyclic Fixed File also called as cyclic-recording file.        All files are physically stored in the nonvolatile memory area (typically EEPROM or FLASH) of the Smartcard.        
However, the existing file system has disadvantage as follows.                1. If operation system of Smartcard supports the service provided by the WEB server (WebServer), it customarily uses a file system similar to FAT16 or FAT32 which prominent characteristic lies in long file name. But the file system of ISO7816-4 does not meet with this characteristic, namely, it does not support the long file name; moreover, supporting WEB service is a developing trend of Smartcard, which means that it is necessary for considering the long file name;        2. As all files are stored in the nonvolatile memory area and they does not support temporary file, applying inner share information must depend on global variable of internal storage or permanent file.        
As can be seen, for supporting WEB service, it is necessary to re-define the structure of file system such that the file system can support WEB service; namely, it is necessary to define a new directory node for supporting WEB service, which mainly means that the file system defined by ISO7816-4 employs DF as root directory of application, and the DF can be embedded but lack of characteristic in giving prominence to application root directory. Moreover, for supporting long file name, it is necessary to re-define characteristic for every directory node in file system; and it is necessary to add the way of selecting file, namely, the way of selecting file need to support selecting way of URL as Smartcard is required to support WEB service; and it is necessary to support creating temporary file,
A new Smartcard file system is hereby provided in this invention.